package com.yklx.youke.config;

import com.yklx.util.JwtUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class AppConfig {

    @Bean
    public JwtUtil jwtUtil(@Value("${jwt.secret:mySecretKey123456789012345678901234567890}") String secret,
                           @Value("${jwt.expiration:86400}") Long expiration) {
        return new JwtUtil(secret, expiration);
    }
}